package com.johnguo.cu_service;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class AppClient {
	public static void main(String... args) throws IOException, InterruptedException {
		File file = new File("D:/工作/CU/IDCISP信息安全管理日志上报/sock-eu-kw-24-13.data");
		System.out.println("文件长度：" + file.length());
		FileInputStream fis = new FileInputStream(file);
		byte[] fileBytes = new byte[(int) file.length()];
		fis.read(fileBytes, 0, (int) (file.length() - 1));
		Socket socket = new Socket("192.168.1.52", 10688);
		OutputStream out = socket.getOutputStream();
		out.write(fileBytes);
		out.flush();
		Thread.sleep(2000);
		socket.close();
		// out.
	}
}
